package cloudspace.util;

public abstract class StatsProvider
{
    public static String getFreeMemory()
    {
        long free = Runtime.getRuntime().freeMemory();
        return "Free Memory: " + free / 1048576;
    }


    public static String getTotalMemory()
    {
        long total = Runtime.getRuntime().totalMemory();
        return "Total Memory: " + total / 1048576;
    }


    public static String getUsedMemory()
    {
        long used = Runtime.getRuntime().totalMemory()
            - Runtime.getRuntime().freeMemory();
        return "Used Memory: " + used / Runtime.getRuntime().totalMemory()
            + "%";
    }
}
